package com.peanut.bosskg.service.other.sign;

import com.alibaba.fastjson.JSON;
import com.peanut.bosskg.entity.ResponseMessageVO;
import com.peanut.bosskg.entity.sign.SignSohoDTO;
import com.peanut.bosskg.enums.FunCodeEnum;
import com.peanut.bosskg.service.BaseService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/***
 *
 *
 * 描    述：用户签约接口
 *
 * 创 建 者：@author lg
 * 创建时间：2021/7/22下午4:35
 * 创建描述：
 *
 */
@Service
@Slf4j
public class UserSignService extends BaseService {


    /**
     * @param funCodeEnum
     * @param signSohoDTO
     * @return
     * @throws Exception
     */
    public SignSohoDTO doBusiness(FunCodeEnum funCodeEnum, SignSohoDTO signSohoDTO) throws Exception {
        log.info("用户签约接口开始:{}，{}", funCodeEnum, signSohoDTO);
        ResponseMessageVO responseMessage = applyYouFuByHttpPost(funCodeEnum, signSohoDTO);
        SignSohoDTO sohoDTO = JSON.parseObject(responseMessage.getResData(), SignSohoDTO.class);
        log.info("用户签约接口结束:{}", sohoDTO);
        return sohoDTO;
    }

}
